﻿Imports Windows.Phone.System.UserProfile

Namespace Utility
    Public Module LockScreenHelper
        Public Async Sub SetBackground(imageUri As Uri)
            If Not LockScreenManager.IsProvidedByCurrentApplication Then
                Await LockScreenManager.RequestAccessAsync
            End If
            If LockScreenManager.IsProvidedByCurrentApplication Then
                LockScreen.SetImageUri(imageUri)
            End If
        End Sub

        Public Sub SetBackground(imageurl As String)
            Dim imageUri As New Uri(imageurl, UriKind.RelativeOrAbsolute)
            SetBackground(imageUri)
        End Sub
    End Module
End Namespace